#include "NotificationPanel.h"
#include "StringUtilities.h"
#include "PrintUtilities.h"
#include "MenuManager.h"
#include "IPanelDelegate.h"
#include "StlStringAndStreams.h"

#include <cassert>

NotificationPanel::NotificationPanel(MenuManager* const i_menuManager)
	: Menu(i_menuManager)
{
}

void NotificationPanel::Draw() const
{
	STD::cout << Print::Title("NOTIFICATION PANEL");
	STD::cout << STD::endl << m_sentence << STD::endl << STD::endl;
	STD::cout << Print::Options("0) Return to previous menu'.");
	STD::cout << "Selection: ";	
}

bool NotificationPanel::Input(const STL::string& i_input)
{
	size_t res = Utilities::StringToInt(i_input);

	if(res != 0)
		return false;

	assert(m_delegate);
	m_delegate->PanelWillClose(true);
	GetMM()->PopMenu();

	return true;
}
